﻿Namespace Messages
    Public Class ActionMessage
        Inherits RequestBase
        Implements IRequest

#Region "Member Fields"
        Private _action As Lookups.ActionEnum
#End Region

#Region "Properties"
        Public Property Action() As Lookups.ActionEnum
            Get
                Return _action
            End Get
            Set(ByVal value As Lookups.ActionEnum)
                _action = value
            End Set
        End Property
#End Region

#Region "Constructors"
        Public Sub New()

        End Sub

        Public Sub New(ByVal serialNumber As String, ByVal token As Int32, ByVal action As Lookups.ActionEnum)
            MyBase.SerialNumber = serialNumber
            MyBase.Token = token
            Me.Action = action
        End Sub
#End Region

#Region "IMessage Implementation"
        Public Function GetQueryString() As String Implements IRequest.GetQueryString
            Return String.Format("sn={0}&token={1}&action={2}", SerialNumber, Token, DirectCast(Action, Int32))
        End Function
#End Region

    End Class
End Namespace